#pragma once


#include "RayTracer/RayTracer.hpp"
#include "RayTracer/Model.hpp"


namespace RayTracer
{
	class BEGIN_ALIGNED( Sphere, 16 ) : public Model
	{
	public:
		ALIGNED_MEMORY( Sphere, 16 );

		Sphere();

		virtual bool					Parse( Scene& s, JSONValue* v ) override;
		virtual bool					Intersect( Vector3::ParamType_t origin, Vector3::ParamType_t dir, float& t ) const override;
		virtual Vector3					Normal( const Vector3& hp ) const override;

	private:
		Vector3							mPosition;
		float							mRadius;
	} END_ALIGNED( Sphere, 16 );
}
